package com.foo.designpattern.mediator;

/**
 * com.foo.designpattern.mediator
 * Created with IntelliJ IDEA.
 * Created by jiang on 2016-06-02 16:26.
 *
 * @Description 抽象同事类(Colleague)角色
 * 抽象同事类角色：定义出中介者到同事对象的接口。同事对象只知道中介者而不知道其余的同事对象。
 */

public abstract class Person {
    protected String name;
    // 持有一个中介者对象
    protected Mediator mediator;

    /**
     * 构造函数
     *
     * @param name
     * @param mediator
     */
    public Person(String name, Mediator mediator) {
        this.name = name;
        this.mediator = mediator;
    }
}
